#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    int n = 0, x = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
    {
        int sum = 0, a = 0;
        for (int j = 0; j < 3; ++j)
        {
            scanf("%d", &a);
            sum += a;
        }
        if (sum < 180) x++;
    }
    printf("%d\n", x);
    return 0;
}